 package com.miracle.erp.util;

public class AjaxObj {
		/**
		 * 1 表示成功 0表示失败
		 */
		private int result;
		/**
		 * 响应信息 （通常是异常信息）
		 */
		private String msg;
		/**
		 * 响应对象
		 * @return
		 */
		private Object object;
		
		
	
	



	public AjaxObj(int result) {
			super();
			this.result = result;
		}



	public AjaxObj(int result, String msg) {
			super();
			this.result = result;
			this.msg = msg;
		}



	public AjaxObj(int result, Object object) {
			super();
			this.result = result;
			this.object = object;
		}



	public AjaxObj(int result, String msg, Object object) {
			super();
			this.result = result;
			this.msg = msg;
			this.object = object;
		}



	public int getResult() {
		return result;
	}



	public void setResult(int result) {
		this.result = result;
	}



	public String getMsg() {
		return msg;
	}



	public void setMsg(String msg) {
		this.msg = msg;
	}



	public Object getObject() {
		return object;
	}



	public void setObject(Object object) {
		this.object = object;
	}



	public String  toJSON() {
//		String jsonStr = "{\"result\":\""+result+"\",\"msg\":\""+msg+"\",\"object\":\""+object+"\"}";
		    String jsonStr = "{\"result\":\""+result+"\",\"msg\":\""+msg+"\",\"object\":\""+object+"\"}";
		return jsonStr;
	}

}
